/*
 * @Date: 2024-04-03 09:24:04
 * @LastEditors: bingkui.wu
 * @LastEditTime: 2024-04-07 09:33:48
 * @Description: 听写结果
 */
import mongoose, { Schema, Model, Document } from "mongoose";

export interface IPaper extends Document {
  userId: number;
  categoryId: number;
  gradeId: number;
  unitId: number;
  unitName: string;
  wordId: string;
  createTime: number;
  isCorrect: boolean;
  result: string;
}

export interface IPaperModel extends Model<IPaper> {}

const schema = new Schema({
  userId: String,
  categoryId: Number,
  gradeId: Number,
  unitId: Number,
  unitName: String,
  wordId: String,
  createTime: Number,
  isCorrect: Boolean,
  result: String,
});

export const Paper = mongoose.model<IPaper>("paper", schema) as IPaperModel;
